<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableline"
				id="Table2">
    <tr>
      <td height="40" align="center" bgcolor="#FFFFFF" class="STYLE4">考点新闻列表</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF" class="bl"><div style="FONT-FAMILY: arial" align="center"><font face="宋体">
       </font>
          <table width="100%" border="0">
            <tr align="center">
              <td width="5%" height="30">&nbsp;</td>
              <td align="left"><font size="4" color="#FF0000" >&nbsp;&nbsp;&nbsp;考点新闻标题</font></td>
              <td align="center" width="13%"><font size="4" color="#FF0000" >是否首页显示</font></td>
              <td width="15%"><font size="4" color="#FF0000" >考点新闻发布时间</font></td>
              <td width="20%"><font size="4" color="#FF0000" >操作</font></td>
            </tr>
        <c:if test="${!empty pm.datas}">
		<c:forEach items="${pm.datas  }" var="news">
            <tr align="center">
              <td>&nbsp;</td>
              <td align="left"><a href="newsAdmin.do?method=findNewsById&id=${news.id}">${news.newstopic}</a></td>
              <td>
            	<c:if test="${news.state == 0 }">否</c:if>
              	<c:if test="${news.state == 1 }"><font color="red">是</font></c:if>
              </td>
              <td>${news.newstime}</td>
              <td><a href="newsAdmin.do?method=updateNewsState&id=${news.id }" >设置首页显示</a>&nbsp;&nbsp;&nbsp;<a href="newsAdmin.do?method=toUpdateNews&id=${news.id }">编辑</a>&nbsp; &nbsp;&nbsp; <a href="newsAdmin.do?method=deleteNews&id=${news.id }" >删除</a></td>
            </tr>
        </c:forEach>
		</c:if>
          </table>
<pg:pager url="newsAdmin.do" items="${pm.total }" export="currentPageNumber=pageNumber">
	<pg:first>
		<a href="${pageUrl }">首页</a>

	</pg:first>
	<pg:prev>
		<a href="${pageUrl }">上一页</a>
	</pg:prev>
	<pg:pages>
		<c:choose>
			<c:when test="${currentPageNumber eq pageNumber}">
				<font color="red">${pageNumber }</font>
			</c:when>
			<c:otherwise>
				<a href="${pageUrl }">${pageNumber }</a>
			</c:otherwise>
		</c:choose>
	</pg:pages>
	<pg:next>
		<a href="${pageUrl }">下一页</a>
	</pg:next>
	<pg:last>
		<a href="${pageUrl }">尾页</a>
	</pg:last>
</pg:pager>
      </div></td>
    </tr>
  </table>
</body>
</html>